Add a Menu Item

With Travelport Smartpoint 8.0, GetToolsMenu and GetSearchMenu are not supported in Flex Window mode. Select which version of Smartpoint SDK you are using for instructions on adding a menu item.

Add a menu item using Smartpoint SDK 8.0 and later (Flex windows)

Use the SetMenuItemInToolsMenu method and then add submenu items accordingly.

Add a menu item using Smartpoint SDK 7.5 and earlier

You can inject menus anywhere using WPF. However, it is recommended that the Tools menu be used by developers for adding menu items to Smartpoint.

Note: The UIHelper.Instance.GetToolsMenu() has been deprecated. With the addition of Flex windows in Smartpoint 8.0, GetToolsLeftMenu or GetToolsSidebarButton should be used instead.

  1. Get the Tools menu using UIHelper GetToolsMenu.

    Code

  2. Add the menu item. If you add a “Keyword” value in the SmartMenuItem, it can be used by QuickCommands.

Considerations

  • If multiple windows are open, your code may need to go to each open window to inject the menu item.
  • If an agent is adding or removing windows in the Settings pane, you can subscribe to that event and will be notified so that you can account for the new menu item as needed.